/*
 * @Author: dingyuwen ding_yuwen@163.com
 * @Date: 2023-02-08 18:03:17
 * @LastEditTime: 2023-10-20 16:02:51
 * @LastEditors: DingYuwen 43669762+DingYuwen@users.noreply.github.com
 * @Description:
 */

// Localization
import '@tourfly/locales/i18n';
import { memo } from 'react';
import { createStandaloneToast } from '@chakra-ui/toast';
import { ThemeLocaleProvider } from '@tourfly/theme';
import AppRoutes from './router';
import { useTranslation } from 'react-i18next';

const { ToastContainer } = createStandaloneToast();

const App = () => {
  const { i18n } = useTranslation();
  const direction = i18n.dir();
  return (
    <ThemeLocaleProvider direction={direction}>
      <AppRoutes />
      <ToastContainer />
    </ThemeLocaleProvider>
  );
};
export default memo(App);
